package es.javamyadmin.beans;

import java.io.Serializable;
import java.util.Collection;

import es.javamyadmin.modelo.ModelFacade;
import es.javamyadmin.modelo.Triggers;
/**
 * Bean de los trigger de la base de datos
 * @author Emilio Javier Castillo Gonzalez
 * @author Hector Delgado Duran
 *
 */
public class ListaTriggersBean implements Serializable{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -7901664401551205268L;
	private String user;
	private String pass;
	private String host;
	private String port;
	private String database;
	
	private String nombre;
	private String evento;
	private String tabla;
	private String estamento;
	private String timing;
	private String sqlMode;
	private String definidcion;
	private String character;
	private String collation;
	private String created;
	private String databaseCollation;

	/**
	 * Constructor
	 */
	public ListaTriggersBean(){
		super();
	}

	

	
	/**
	 * @return the user
	 */
	public String getUser() {
		return user;
	}




	/**
	 * @param user the user to set
	 */
	public void setUser(String user) {
		this.user = user;
	}




	/**
	 * @return the pass
	 */
	public String getPass() {
		return pass;
	}




	/**
	 * @param pass the pass to set
	 */
	public void setPass(String pass) {
		this.pass = pass;
	}




	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}




	/**
	 * @param host the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}




	/**
	 * @return the port
	 */
	public String getPort() {
		return port;
	}




	/**
	 * @param port the port to set
	 */
	public void setPort(String port) {
		this.port = port;
	}




	/**
	 * @return the database
	 */
	public String getDatabase() {
		return database;
	}




	/**
	 * @param database the database to set
	 */
	public void setDatabase(String database) {
		this.database = database;
	}




	/**
	 * @return the nombre
	 */
	public String getNombre() {
		return nombre;
	}




	/**
	 * @param nombre the nombre to set
	 */
	public void setNombre(String nombre) {
		this.nombre = nombre;
	}




	/**
	 * @return the evento
	 */
	public String getEvento() {
		return evento;
	}




	/**
	 * @param evento the evento to set
	 */
	public void setEvento(String evento) {
		this.evento = evento;
	}




	/**
	 * @return the tabla
	 */
	public String getTabla() {
		return tabla;
	}




	/**
	 * @param tabla the tabla to set
	 */
	public void setTabla(String tabla) {
		this.tabla = tabla;
	}




	/**
	 * @return the estamento
	 */
	public String getEstamento() {
		return estamento;
	}




	/**
	 * @param estamento the estamento to set
	 */
	public void setEstamento(String estamento) {
		this.estamento = estamento;
	}




	/**
	 * @return the timing
	 */
	public String getTiming() {
		return timing;
	}




	/**
	 * @param timing the timing to set
	 */
	public void setTiming(String timing) {
		this.timing = timing;
	}




	/**
	 * @return the sqlMode
	 */
	public String getSqlMode() {
		return sqlMode;
	}




	/**
	 * @param sqlMode the sqlMode to set
	 */
	public void setSqlMode(String sqlMode) {
		this.sqlMode = sqlMode;
	}




	/**
	 * @return the definidcion
	 */
	public String getDefinidcion() {
		return definidcion;
	}




	/**
	 * @param definidcion the definidcion to set
	 */
	public void setDefinidcion(String definidcion) {
		this.definidcion = definidcion;
	}




	/**
	 * @return the character
	 */
	public String getCharacter() {
		return character;
	}




	/**
	 * @param character the character to set
	 */
	public void setCharacter(String character) {
		this.character = character;
	}




	/**
	 * @return the collation
	 */
	public String getCollation() {
		return collation;
	}




	/**
	 * @param collation the collation to set
	 */
	public void setCollation(String collation) {
		this.collation = collation;
	}




	/**
	 * @return the created
	 */
	public String getCreated() {
		return created;
	}




	/**
	 * @param created the created to set
	 */
	public void setCreated(String created) {
		this.created = created;
	}




	/**
	 * @return the databaseCollation
	 */
	public String getDatabaseCollation() {
		return databaseCollation;
	}




	/**
	 * @param databaseCollation the databaseCollation to set
	 */
	public void setDatabaseCollation(String databaseCollation) {
		this.databaseCollation = databaseCollation;
	}



	/**
	 * Metodo para obtener los triggers
	 * @return Collection<Triggers>
	 */
	public Collection<Triggers> getTriggers(){
		Collection<Triggers> tri = ModelFacade.getTriggers(user, pass, host, port, database);
		return tri;
	}
	
}
